import asyncio

class AsyncWorker:
    async def run(self, coro):
        await coro

# 使用示例
async def print_numbers():
    for i in range(5):
        print(i)
        await asyncio.sleep(1)  # 模拟异步操作

async def main():
    worker = AsyncWorker()
    await worker.run(print_numbers())

asyncio.run(main())